namespace('base.role');

base.role.init = function(){
	$('.delete').click(function(){
		$('#btnConfirmDeleteRole').attr('roleId', $(this).attr('roleId'));
		$('#modalConfirmDeleteRole').modal({});
	});
	
	$('#btnConfirmDeleteRole').click(function(){
		toLocation('base/role/role!delete.action?id=' 
				+ $(this).attr('roleId'));
	});
	
	$('#roleTypes').change(function(){
		toLocation('base/role/role.action?roleTypeId=' 
				+ $(this).val());
	});
};